package com.study.design.template.hook;

public class ConcreteClass2 extends AbstractClass {
    private boolean flag = true;

    @Override
    protected void doSomething() {
        //实现基本方法，业务处理逻辑
        System.out.println("ConcreteClass2-doSomething");
    }

    @Override
    protected void doAnything() {
        //实现基本方法，业务处理逻辑
        System.out.println("ConcreteClass2-doAnything");

    }

    @Override
    protected boolean flag() {
        return this.flag;
    }

    public void setFlag(boolean flag) {
        //由客户端解决是否运行
        this.flag = flag;
    }
}
